const http = require("http");
try{
    http.createServer((req,res) => {
        var str = "hello world"
        res.end(str);
    }).listen(8081);
    
    // var test = "server is listening 8081";
    console.log(test);
}catch(error){
    console.log(error.message);
    console.log(error.constructor.name);
}

process.on("uncaughtException",(err) => {
    console.log(err.message);
    console.log(err.constructor.name)
})